From: Stephane Bisson Date: Fri, 1 Sep 2017 14:47:40 +0000 (-0400) Subject: RCFilters: make isStructuredFilterUiEnabled public X-Git-Tag: 1.31.0-rc.0~2205^2 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=fe5c10179964110dc35f3483d0196c905a7eff47;p=lhc%2Fweb%2Fwiklou.git RCFilters: make isStructuredFilterUiEnabled public ... so it can be used by ORES to know if it's enabled on a specific page without duplicating the checks of global variables, user preferences, and request parameters. Bug: T174725 Change-Id: I1cb402559edb242b40a77f509480560f0636264d --- diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index acd5d14fe6..5f544042f9 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -1536,7 +1536,7 @@ abstract class ChangesListSpecialPage extends SpecialPage { * * @return bool */ - protected function isStructuredFilterUiEnabled() { + public function isStructuredFilterUiEnabled() { return $this->getUser()->getOption( 'rcenhancedfilters' ); } diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index ba3cb87ecf..7049744224 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -111,7 +111,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { } } - protected function isStructuredFilterUiEnabled() { + public function isStructuredFilterUiEnabled() { return parent::isStructuredFilterUiEnabled() && ( $this->getConfig()->get( 'StructuredChangeFiltersOnWatchlist' ) || $this->getRequest()->getBool( 'rcfilters' ) );